home *** CD-ROM | disk | FTP | other *** search
/ Aminet 4 / Aminet 4 - November 1994.iso / aminet / dev / gcc / gcc260utilsdoc.lha / gnu / man / man1 / cpio.1 < prev    next >
Encoding:
Text File  |  1994-07-31  |  13.8 KB  |  397 lines

  1.  
  2.  
  3.  
  4. CPIO(1L)          MISC. REFERENCE MANUAL PAGES           CPIO(1L)
  5.  
  6.  
  7.  
  8. NAME
  9.      cpio - copy files to and from archives
  10.  
  11. SYNOPSIS
  12.      cpio {-o|--create} [-0acvABLV] [-C bytes]  [-H  format]  [-M
  13.      message]        [-O        [[user@]host:]archive]        [-F
  14.      [[user@]host:]archive]        [--file=[[user@]host:]archive]
  15.      [--format=format]   [--message=message]  [--null]  [--reset-
  16.      access-time]  [--verbose]   [--dot]   [--append]   [--block-
  17.      size=blocks]   [--dereference]   [--io-size=bytes]  [--help]
  18.      [--version] < name-list [> archive]
  19.  
  20.      cpio {-i|--extract} [-bcdfmnrtsuvBSV] [-C bytes]  [-E  file]
  21.      [-H   format]   [-M   message]  [-R  [user][:.][group]]  [-I
  22.      [[user@]host:]archive]      [-F       [[user@]host:]archive]
  23.      [--file=[[user@]host:]archive]  [--make-directories] [--non-
  24.      matching] [--preserve-modification-time] [--numeric-uid-gid]
  25.      [--rename]    [--list]   [--swap-bytes]   [--swap]   [--dot]
  26.      [--unconditional]     [--verbose]      [--block-size=blocks]
  27.      [--swap-halfwords]  [--io-size=bytes]  [--pattern-file=file]
  28.      [--format=format]     [--owner=[user][:.][group]]     [--no-
  29.      preserve-owner]   [--message=message]  [--help]  [--version]
  30.      [pattern...] [< archive]
  31.  
  32.      cpio {-p|--pass-through} [-0adlmuvLV] [-R [user][:.][group]]
  33.      [--null] [--reset-access-time] [--make-directories] [--link]
  34.      [--preserve-modification-time] [--unconditional] [--verbose]
  35.      [--dot]  [--dereference]  [--owner=[user][:.][group]] [--no-
  36.      preserve-owner] [--help] [--version] destination-directory <
  37.      name-list
  38.  
  39. DESCRIPTION
  40.      This manual page documents the GNU version  of  cpio.   cpio
  41.      copies  files into or out of a cpio or tar archive, which is
  42.      a file that contains  other  files  plus  information  about
  43.      them,  such as their pathname, owner, timestamps, and access
  44.      permissions.  The archive can be another file on the disk, a
  45.      magnetic tape, or a pipe.  cpio has three operating modes.
  46.  
  47.      In copy-out mode, cpio copies files  into  an  archive.   It
  48.      reads  a  list  of  filenames, one per line, on the standard
  49.      input, and writes the archive onto the standard  output.   A
  50.      typical  way  to  generate the list of filenames is with the
  51.      find command; you should give  find  the  -depth  option  to
  52.      minimize  problems  with permissions on directories that are
  53.      unwritable or not searchable.
  54.  
  55.      In copy-in mode, cpio copies files  out  of  an  archive  or
  56.      lists  the  archive contents.  It reads the archive from the
  57.      standard input.  Any non-option command line  arguments  are
  58.      shell  globbing  patterns;  only  files in the archive whose
  59.      names match one or more of those patterns  are  copied  from
  60.  
  61.  
  62.  
  63. Sun Release 4.1           Last change:                          1
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70. CPIO(1L)          MISC. REFERENCE MANUAL PAGES           CPIO(1L)
  71.  
  72.  
  73.  
  74.      the  archive.   Unlike  in  the  shell,  an initial `.' in a
  75.      filename does match a wildcard at the start  of  a  pattern,
  76.      and a `/' in a filename can match wildcards.  If no patterns
  77.      are given, all files are extracted.
  78.  
  79.      In copy-pass mode, cpio copies files from one directory tree
  80.      to another, combining the copy-out and copy-in steps without
  81.      actually using an archive.  It reads the list  of  files  to
  82.      copy  from  the  standard input; the directory into which it
  83.      will copy them is given as a non-option argument.
  84.  
  85.      cpio supports the following  archive  formats:  binary,  old
  86.      ASCII, new ASCII, crc, HPUX binary, HPUX old ASCII, old tar,
  87.      and POSIX.1 tar. The binary format is  obsolete  because  it
  88.      encodes  information  about  the  files in a way that is not
  89.      portable between different machine architectures.   The  old
  90.      ASCII format is portable between different machine architec-
  91.      tures, but should not be used on file systems with more than
  92.      65536  i-nodes.   The  new  ASCII format is portable between
  93.      different machine architectures and can be used on any  size
  94.      file  system,  but is not supported by all versions of cpio;
  95.      currently, it is only supported by GNU and Unix System V R4.
  96.      The  crc  format is like the new ASCII format, but also con-
  97.      tains a checksum for each file which  cpio  calculates  when
  98.      creating  an archive and verifies when the file is extracted
  99.      from the archive.  The HPUX formats are provided for  compa-
  100.      tibility  with  HPUX's  cpio  which stores device files dif-
  101.      ferently.
  102.  
  103.      The tar format is provided for compatability  with  the  tar
  104.      program.   It  can  not  be used to archive files with names
  105.      longer than 100 characters, and can not be used  to  archive
  106.      "special"  (block  or character devices) files.  The POSIX.1
  107.      tar format can not be  used  to  archive  files  with  names
  108.      longer  than  255 characters (less unless they have a "/" in
  109.      just the right place).
  110.  
  111.      By default, cpio creates binary format archives, for  compa-
  112.      tibility  with  older  cpio  programs.  When extracting from
  113.      archives,  cpio  automatically  recognizes  which  kind   of
  114.      archive  it  is  reading  and  can  read archives created on
  115.      machines with a different byte-order.
  116.  
  117.      Some of the options to cpio apply only to certain  operating
  118.      modes;  see the SYNOPSIS section for a list of which options
  119.      are allowed in which modes.
  120.  
  121.   OPTIONS
  122.      -_0, --_n_u_l_l
  123.           In  copy-out  and  copy-pass  modes,  read  a  list  of
  124.           filenames  terminated  by a null character instead of a
  125.           newline, so that files whose names contain newlines can
  126.  
  127.  
  128.  
  129. Sun Release 4.1           Last change:                          2
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136. CPIO(1L)          MISC. REFERENCE MANUAL PAGES           CPIO(1L)
  137.  
  138.  
  139.  
  140.           be  archived.  GNU find is one way to produce a list of
  141.           null-terminated filenames.
  142.  
  143.      -_a, --_r_e_s_e_t-_a_c_c_e_s_s-_t_i_m_e
  144.           Reset the access times of files after reading them,  so
  145.           that it does not look like they have just been read.
  146.  
  147.      -_A, --_a_p_p_e_n_d
  148.           Append to an existing archive.  Only works in  copy-out
  149.           mode.   The  archive must be a disk file specified with
  150.           the -_O or -_F (--_f_i_l_e) option.
  151.  
  152.      -_b, --_s_w_a_p
  153.           In copy-in mode, swap both halfwords of words and bytes
  154.           of halfwords in the data.  Equivalent to -_s_S.  Use this
  155.           option to convert 32-bit  integers  between  big-endian
  156.           and little-endian machines.
  157.  
  158.      -_B   Set the I/O block size to 5120  bytes.   Initially  the
  159.           block size is 512 bytes.
  160.  
  161.      --_b_l_o_c_k-_s_i_z_e=_B_L_O_C_K-_S_I_Z_E
  162.           Set the I/O block size to BLOCK-SIZE * 512 bytes.
  163.  
  164.      -_c   Use the old portable (ASCII) archive format.
  165.  
  166.      -_C _I_O-_S_I_Z_E, --_i_o-_s_i_z_e=_I_O-_S_I_Z_E
  167.           Set the I/O block size to IO-SIZE bytes.
  168.  
  169.      -_d, --_m_a_k_e-_d_i_r_e_c_t_o_r_i_e_s
  170.           Create leading directories where needed.
  171.  
  172.      -_E _F_I_L_E, --_p_a_t_t_e_r_n-_f_i_l_e=_F_I_L_E
  173.           In copy-in mode, read  additional  patterns  specifying
  174.           filenames  to  extract or list from FILE.  The lines of
  175.           FILE are treated as if they had been  non-option  argu-
  176.           ments to cpio.
  177.  
  178.      -_f, --_n_o_n_m_a_t_c_h_i_n_g
  179.           Only copy files that do not match any of the given pat-
  180.           terns.
  181.  
  182.      -_F, --_f_i_l_e=_a_r_c_h_i_v_e
  183.           Archive filename to use instead of  standard  input  or
  184.           output.   To use a tape drive on another machine as the
  185.           archive, use a filename that starts  with  `HOSTNAME:'.
  186.           The  hostname  can be preceded by a username and an `@'
  187.           to access the remote tape drive as that  user,  if  you
  188.           have  permission  to  do so (typically an entry in that
  189.           user's `~/.rhosts' file).
  190.  
  191.      --_f_o_r_c_e-_l_o_c_a_l
  192.  
  193.  
  194.  
  195. Sun Release 4.1           Last change:                          3
  196.  
  197.  
  198.  
  199.  
  200.  
  201.  
  202. CPIO(1L)          MISC. REFERENCE MANUAL PAGES           CPIO(1L)
  203.  
  204.  
  205.  
  206.           With -_F, -_I, or -_O, take the archive file name to be  a
  207.           local  file  even  if  it contains a colon, which would
  208.           ordinarily indicate a remote host name.
  209.  
  210.      -_H _F_O_R_M_A_T, --_f_o_r_m_a_t=_F_O_R_M_A_T
  211.           Use archive  format  FORMAT.   The  valid  formats  are
  212.           listed  below;  the  same  names are also recognized in
  213.           all-caps.  The default in copy-in mode is to  automati-
  214.           cally  detect  the archive format, and in copy-out mode
  215.           is "bin".
  216.  
  217.           bin  The obsolete binary format.
  218.  
  219.           odc  The old (POSIX.1) portable format.
  220.  
  221.           newc The new (SVR4)  portable  format,  which  supports
  222.                file systems having more than 65536 i-nodes.
  223.  
  224.           crc  The new (SVR4) portable  format  with  a  checksum
  225.                added.
  226.  
  227.           tar  The old tar format.
  228.  
  229.           ustar
  230.                The POSIX.1 tar format.  Also recognizes  GNU  tar
  231.                archives, which are similar but not identical.
  232.  
  233.           hpbin
  234.                The obsolete binary format  used  by  HPUX's  cpio
  235.                (which stores device files differently).
  236.  
  237.           hpodc
  238.                The portable format used  by  HPUX's  cpio  (which
  239.                stores device files differently).
  240.  
  241.      -_i, --_e_x_t_r_a_c_t
  242.           Run in copy-in mode.
  243.  
  244.      -_I _a_r_c_h_i_v_e
  245.           Archive filename to use instead of standard input.   To
  246.           use a tape drive on another machine as the archive, use
  247.           a filename that starts with `HOSTNAME:'.  The  hostname
  248.           can  be preceded by a username and an `@' to access the
  249.           remote tape drive as that user, if you have  permission
  250.           to do so (typically an entry in that user's `~/.rhosts'
  251.           file).
  252.  
  253.      -_k   Ignored; for compatibility with other versions of cpio.
  254.  
  255.      -_l, --_l_i_n_k
  256.           Link files instead of copying them, when possible.
  257.  
  258.  
  259.  
  260.  
  261. Sun Release 4.1           Last change:                          4
  262.  
  263.  
  264.  
  265.  
  266.  
  267.  
  268. CPIO(1L)          MISC. REFERENCE MANUAL PAGES           CPIO(1L)
  269.  
  270.  
  271.  
  272.      -_L, --_d_e_r_e_f_e_r_e_n_c_e
  273.           Dereference symbolic links (copy the  files  that  they
  274.           point to instead of copying the links).
  275.  
  276.      -_m, --_p_r_e_s_e_r_v_e-_m_o_d_i_f_i_c_a_t_i_o_n-_t_i_m_e
  277.           Retain previous file modification times  when  creating
  278.           files.
  279.  
  280.      -_M _M_E_S_S_A_G_E, --_m_e_s_s_a_g_e=_M_E_S_S_A_G_E
  281.           Print MESSAGE when the end of a volume  of  the  backup
  282.           media  (such as a tape or a floppy disk) is reached, to
  283.           prompt the user to insert a  new  volume.   If  MESSAGE
  284.           contains the string "%d", it is replaced by the current
  285.           volume number (starting at 1).
  286.  
  287.      -_n, --_n_u_m_e_r_i_c-_u_i_d-_g_i_d
  288.           In the verbose table of contents listing, show  numeric
  289.           UID and GID instead of translating them into names.
  290.  
  291.       --_n_o-_p_r_e_s_e_r_v_e-_o_w_n_e_r
  292.           In copy-in mode and copy-pass mode, do not  change  the
  293.           ownership  of  the  files; leave them owned by the user
  294.           extracting them.  This  is  the  default  for  non-root
  295.           users,  so  that  users on System V don't inadvertantly
  296.           give away files.
  297.  
  298.      -_o, --_c_r_e_a_t_e
  299.           Run in copy-out mode.
  300.  
  301.      -_O _a_r_c_h_i_v_e
  302.           Archive filename to use instead of standard output.  To
  303.           use a tape drive on another machine as the archive, use
  304.           a filename that starts with `HOSTNAME:'.  The  hostname
  305.           can  be preceded by a username and an `@' to access the
  306.           remote tape drive as that user, if you have  permission
  307.           to do so (typically an entry in that user's `~/.rhosts'
  308.           file).
  309.  
  310.      -_p, --_p_a_s_s-_t_h_r_o_u_g_h
  311.           Run in copy-pass mode.
  312.  
  313.      -_r, --_r_e_n_a_m_e
  314.           Interactively rename files.
  315.  
  316.      -_R [_u_s_e_r][:.][_g_r_o_u_p], --_o_w_n_e_r [_u_s_e_r][:.][_g_r_o_u_p]
  317.           In copy-out and copy-pass modes, set the  ownership  of
  318.           all  files  created to the specified user and/or group.
  319.           Either the user or the group, or both, must be present.
  320.           If the group is omitted but the ":" or "." separator is
  321.           given, use the given  user's  login  group.   Only  the
  322.           super-user can change files' ownership.
  323.  
  324.  
  325.  
  326.  
  327. Sun Release 4.1           Last change:                          5
  328.  
  329.  
  330.  
  331.  
  332.  
  333.  
  334. CPIO(1L)          MISC. REFERENCE MANUAL PAGES           CPIO(1L)
  335.  
  336.  
  337.  
  338.      -_s, --_s_w_a_p-_b_y_t_e_s
  339.           In copy-in mode, swap the bytes of each halfword  (pair
  340.           of bytes) in the files.
  341.  
  342.      -_S, --_s_w_a_p-_h_a_l_f_w_o_r_d_s
  343.           In copy-in mode, swap the halfwords  of  each  word  (4
  344.           bytes) in the files.
  345.  
  346.      -_t, --_l_i_s_t
  347.           Print a table of contents of the input.
  348.  
  349.      -_u, --_u_n_c_o_n_d_i_t_i_o_n_a_l
  350.           Replace all files, without asking  whether  to  replace
  351.           existing newer files with older files.
  352.  
  353.      -_v, --_v_e_r_b_o_s_e
  354.           List the files processed, or with -_t, give an  `ls  -l'
  355.           style table of contents listing.  In a verbose table of
  356.           contents of a ustar archive, user and  group  names  in
  357.           the  archive  that do not exist on the local system are
  358.           replaced by the names that correspond  locally  to  the
  359.           numeric UID and GID stored in the archive.
  360.  
  361.      -_V --_d_o_t
  362.           Print a "." for each file processed.
  363.  
  364.      --_v_e_r_s_i_o_n
  365.           Print the cpio program version number and exit.
  366.  
  367.  
  368.  
  369.  
  370.  
  371.  
  372.  
  373.  
  374.  
  375.  
  376.  
  377.  
  378.  
  379.  
  380.  
  381.  
  382.  
  383.  
  384.  
  385.  
  386.  
  387.  
  388.  
  389.  
  390.  
  391.  
  392.  
  393. Sun Release 4.1           Last change:                          6
  394.  
  395.  
  396.  
  397.